<?php
declare(strict_types=1);

namespace app\api\service\video;
use app\common\service\BaseService;


/**
 * 视频处理类
 */
class Ffmpeg extends BaseService
{
    /**获取视频第一帧
     * @param $video
     * @return string
     */
   public function getFirstFrame($video):string
   {
        $cover_image = '';
        $cmd = "ffmpeg -i {$video} -frames:v 1 output_frame.jpg";
        shell_exec($cmd);
        return $cover_image;
   }

}